#ifndef __UXML_ELEMENT_H__
#define __UXML_ELEMENT_H__

#include "zDefine.h"
#include "zCore.h"
#include "xNode.h"

#include <libxml/tree.h>

namespace ck
{
	namespace xml
	{
		class Attribute;

		class ZCORE_API Element : public Node
		{
		public:
			Element(xmlNodePtr pxNode);
			virtual ~Element();

		public:
			Attribute*		SetAttribute(const char* name, const char* value, const char* nmspace = NULL, bool encoding = false);
			Attribute*		GetAttribute(const char* name, const char* nmspace = NULL);

			z_int32			SetContent(const z_char* szContent, bool enccoding=true);
			const z_char*	GetContent();

		protected:
			TextNode*		AddChildText(const z_char* szContent, bool enccoding=true);
		};
	}
}



#endif //__UXML_ELEMENT_H__
